---
title: Agent with Tools
---

Make sure to start the proxy server:

```shell
litellm --model gpt-5-mini --host 127.0.0.1 --port 4000
```

## Code

```python cookbook/models/litellm_openai/tool_use.py
from agno.agent import Agent
from agno.models.litellm import LiteLLMOpenAI
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    model=LiteLLMOpenAI(id="gpt-5-mini"),
    tools=[DuckDuckGoTools()],
        markdown=True,
)
agent.print_response("Whats happening in France?")
```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set your API key">
    ```bash
    export LITELLM_API_KEY=xxx
    ```
  </Step>

  <Step title="Install libraries">
    ```bash
    pip install -U litellm[proxy] openai agno ddgs
    ```
  </Step>

  <Step title="Start the proxy server">
    ```bash
    litellm --model gpt-5-mini --host 127.0.0.1 --port 4000
    ```
  </Step>

  <Step title="Run Agent">
    <CodeGroup>
    ```bash Mac
    python cookbook/models/litellm_openai/tool_use.py
    ```

    ```bash Windows
    python cookbook/models/litellm_openai/tool_use.py
    ```
    </CodeGroup>
  </Step>
</Steps>